/**
 @author Praveen Krupakaran (A0092625)
 */

package sg.edu.nus.iss.team4ft.ui;
import java.awt.BorderLayout;

import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;


import com.cloudgarden.layout.AnchorLayout;


//main tabbed pane
public class ApplicationJPanel extends javax.swing.JPanel {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	{
		//Set Look & Feel
		try {
			javax.swing.UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
		} catch(Exception e) {
			e.printStackTrace();
		}
	}

//	private JTabbedPane mainTabbedPane;
	private JPanel complaints;
	private JPanel billing;
	private JPanel accountPanel;
	private JTabbedPane mainTab;

	/**
	* Auto-generated main method to display this 
	* JPanel inside a new JFrame.
	*/
		
	public ApplicationJPanel() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			BorderLayout thisLayout = new BorderLayout();
			this.setLayout(thisLayout);
			this.setPreferredSize(new java.awt.Dimension(675, 431));
			this.setFont(new java.awt.Font("Segoe UI",1,12));
			{
				mainTab = new JTabbedPane();
				this.add(mainTab, BorderLayout.CENTER);
				mainTab.setPreferredSize(new java.awt.Dimension(350, 392));
				mainTab.setFont(new java.awt.Font("Segoe UI",1,11));
				{
					accountPanel = new JPanel();
					accountPanel.add(new JButton("hi"));
					AccountSubPanel panel = new AccountSubPanel();
					panel.setVisible(true);
					panel.setPreferredSize(new java.awt.Dimension(1000,1000));
					mainTab.addTab("Customer Accounts", null, panel, null);
					accountPanel.setPreferredSize(new java.awt.Dimension(1000,1000));	
				}
				{
					billing = new JPanel();
					BillingPanel billPanel = new BillingPanel();
					billing.add(billPanel);	
					billPanel.setPreferredSize(new java.awt.Dimension(100,50));
					mainTab.addTab("Billing", null, billing, null);					
					AnchorLayout BillingLayout = new AnchorLayout();
					billing.setLayout(BillingLayout);
					billing.setPreferredSize(new java.awt.Dimension(171, 39));
				}
				{
					complaints = new JPanel();
					ComplaintPanel complaintPanel = new ComplaintPanel();
					complaints.add(complaintPanel);
					mainTab.addTab("Complaints", null, complaintPanel, null);
					AnchorLayout ComplaintsLayout = new AnchorLayout();
					complaints.setLayout(ComplaintsLayout);
					complaints.setPreferredSize(new java.awt.Dimension(103, 39));					
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
